﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
using System.Collections;

namespace LibraryMusicStore
{
    public interface IRepository<T> where T : class
    {
        T GetById(int id);
        T Single(Func<T, bool> exp);
        T First();
        IQueryable<T> GetAll();
        void InsertOnSubmit(T entity);
        void DeleteOnSubmit(T entity);
        void DeleteAllOnSubmit(IEnumerable entities);
        void SubmitChanges();
        bool Duplicate(Func<T, bool> exp);
        IEnumerable<T> Where(Func<T, bool> exp);
        MusicStoreEntities GetContext();
    }
}
